﻿@model Zero.Entity.Models.Sys_Menu
<div layouth="10" style="float: left; display: block; overflow: auto; width: 240px; border: solid 1px #CCC; line-height: 21px; background: #fff">
    <ul class="tree treeFolder">
        <li id="menuroot"><a  href="javascript">@Model.MenuName</a>
            @foreach (var m in Model.ChildMenus.OrderBy(o => o.OrderIndex))
            {
                <ul>
                    <li><a href="/Menus/MenuList/@m.MenuID" target="ajax" rel="jbsxBox">@m.MenuName</a>
                        @if (m.ChildMenus.Count() > 0)
                        {
                            <ul>
                                @foreach (var submenu in m.ChildMenus.OrderBy(o => o.OrderIndex))
                                {
                                    <li><a href="/Menus/MenuList/@submenu.MenuID" target="ajax" rel="jbsxBox">@submenu.MenuName</a>
                                        @if (submenu.ChildMenus.Count() > 0)
                                        {
                                            <ul>
                                                @foreach (var sencond in submenu.ChildMenus.OrderBy(o => o.OrderIndex))
                                                {
                                                    <li><a href="/Menus/MenuList/@sencond.MenuID" target="ajax" rel="jbsxBox">@sencond.MenuName</a>
                                                    </li>
                                                }
                                            </ul>
                                    
                                        }

                                    </li>
                                }
                            </ul>
                        }
                    </li>
                </ul>
            }
        </li>

    </ul>
</div>
<div id="jbsxBox" class="unitBox"   style="margin-left: 246px;">
    
</div>
<script type="text/javascript">
    $(document).ready(function () {
        window.setTimeout(function () {
            $("#menuroot ul:first li:first a:first").click();
        },100);
    });
</script>